<div>
    <div class="service-deployment-container" ng-repeat="service in vm.serviceList" ng-class="{'opened': service.opened}">
        <ui-panel class="margin-bottom-10">
            <div class="row service-info-panel">
                <div class="col-md-3">服务: {{service.baseCtrl.podAppName || '-'}}</div>
                <div class="col-md-3">镜像: {{(service.baseCtrl.appImg.imageName && service.baseCtrl.appImg.ver &&
                    service.baseCtrl.appImg.imageName + ':' + service.baseCtrl.appImg.ver.version) || '-'}}</div>
                <div class="col-md-2">容器数: {{service.baseCtrl.podNum || '-'}}</div>
                <div class="col-md-2 text-right">
                    <span class="text-danger">{{(service.baseCtrl.baseForm.$invalid && '请填写正确的配置') ||
                        (service.advCtrl.autoScaleForm.$invalid && '自动伸缩有误') ||
                        (service.advCtrl.domainForm.$invalid && '域名管理有误') || ''}}</span></div>
                <div class="col-md-2 text-right">
                    <ul class="list-inline margin-bottom-0">
                        <li><a ng-click="vm.expendForm(service)" class="service-button" ng-switch="service.opened">
                            <span ng-switch-when="false"><i class="fa fa-pencil"/>编辑</span>
                            <span ng-switch-when="true"><i class="fa fa-long-arrow-up"/>收起</span></a></li>
                        <li> <a ng-click="vm.deleteService($index)" class="service-button"><i class="fa fa-times"/>删除</a></li>
                    </ul>
                </div>
            </div>
        </ui-panel>
        <div class="service-form-container">
            <div class="panel"><div class="panel-body"><service-config-base/></div></div>
            <div class="panel no-padding"><div class="panel-body"><service-config-advance/></div></div>
        </div>
    </div>
    <a class="service-button" ng-click="vm.addService()" ><i class="fa fa-plus"/>添加服务</a>
</div>
<div class="panel-form-footer">
    <a ui-sref="app-service-publish.base" class="btn btn-default btn-sm">上一步</a>
    <button type="button" ng-disabled="vm.loading" ng-click="vm.next()" class="btn btn-primary btn-sm pull-right">
        <i ng-show="vm.loading" class="fa fa-cog fa-lg fa-spin margin-right-5"/>下一步
    </button>
</div>